/*!
 * \file Types.h
 * \brief Nude's variable type wrapper.
 * \author Nus
 * \date 2008/02/15, 23:54
 */

#ifndef __TYPES_H__
#define __TYPES_H__

//! \name Basic type.
//! \{

typedef int s32;                  //!< 32-bit integer.
typedef unsigned int u32;         //!< 32-bit unsigned integer.
typedef long long s64;            //!< 64-bit integer.
typedef unsigned long long u64;   //!< 64-bit unsigned integer.
typedef float f32;                //!< 32-bit floating point.
typedef double f64;               //!< 64-bit floating point.
typedef short s16;                //!< 16-bit integer.
typedef unsigned short u16;       //!< 16-bit unsigned integer.
typedef char s8;                  //!< 8-bit integer.
typedef unsigned char u8;         //!< 8-bit unsigned integer.

//! \}

//! \brief Error codes.
enum eErrorCode {
  EC_CRITICAL_ERROR = -1,         //!< Termination error.
  EC_NONE = 0,                    //!< No error.
  EC_INIT_ERROR,                  //!< Initialization error.
  EC_TERM_ERROR,                  //!< Termination error.
};

//! \brief States.
enum eState {
  ST_UNINITIALIZE = -2,           //!< Uninitialize.
  ST_INITIALIZING = -1,           //!< Initializing.
  ST_READY = 0,                   //!< Ready.
  ST_TERMINATING,                 //!< Terminating.
  ST_TERMINATED,                  //!< Terminated.
  ST_STATE_MAX,                   //!< Max. number of state.
  
  ST_RUNNING = ST_READY,          //!< Aliasing for run state.

  ST_USER_DEFINED = ST_STATE_MAX, //!< User defined.
};

#endif
